<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>循环显示按钮</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="循环显示1-100.html">使用循环显示10个按钮，按钮的字是0到10</a>  <br/><br/>

<br/>
<br/>
<script>
    var i=9;
    while(i>=0) {
        document.write("<input type='button' value='"+i+"' >"+" ");
        if (i%4==0){
            document.write("<br/>");
        }
        i--;
    }

</script>
<br/>
<br/>
<script>
    var i=0;
    while(i<10) {
        document.write("<input type='button' value='"+i+"' >"+" ");
        if (i%4==0){
            document.write("<br/>");
        }
        i++;
    }
</script>
</body>
</html>